package com.cq.teacher.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cq.teacher.mapper.TeacherSchoolMapper;
import com.cq.teacher.domain.TeacherSchool;
import com.cq.teacher.service.ITeacherSchoolService;

/**
 * 校区Service业务层处理
 * 
 * @author cq
 * @date 2024-01-06
 */
@Service
public class TeacherSchoolServiceImpl implements ITeacherSchoolService 
{
    @Autowired
    private TeacherSchoolMapper teacherSchoolMapper;

    /**
     * 查询校区
     * 
     * @param id 校区主键
     * @return 校区
     */
    @Override
    public TeacherSchool selectTeacherSchoolById(Long id)
    {
        return teacherSchoolMapper.selectTeacherSchoolById(id);
    }

    /**
     * 查询校区列表
     * 
     * @param teacherSchool 校区
     * @return 校区
     */
    @Override
    public List<TeacherSchool> selectTeacherSchoolList(TeacherSchool teacherSchool)
    {
        return teacherSchoolMapper.selectTeacherSchoolList(teacherSchool);
    }

    /**
     * 新增校区
     * 
     * @param teacherSchool 校区
     * @return 结果
     */
    @Override
    public int insertTeacherSchool(TeacherSchool teacherSchool)
    {
        return teacherSchoolMapper.insertTeacherSchool(teacherSchool);
    }

    /**
     * 修改校区
     * 
     * @param teacherSchool 校区
     * @return 结果
     */
    @Override
    public int updateTeacherSchool(TeacherSchool teacherSchool)
    {
        return teacherSchoolMapper.updateTeacherSchool(teacherSchool);
    }

    /**
     * 批量删除校区
     * 
     * @param ids 需要删除的校区主键
     * @return 结果
     */
    @Override
    public int deleteTeacherSchoolByIds(Long[] ids)
    {
        return teacherSchoolMapper.deleteTeacherSchoolByIds(ids);
    }

    /**
     * 删除校区信息
     * 
     * @param id 校区主键
     * @return 结果
     */
    @Override
    public int deleteTeacherSchoolById(Long id)
    {
        return teacherSchoolMapper.deleteTeacherSchoolById(id);
    }
}
